package com.starry.module.system.core.enums;

import com.starry.core.common.enums.ErrorCode;

/**
 * System 错误码枚举类
 *
 * @author xiaoke
 */
public interface ErrorCodeConstants {

    //TODO待分配错误码

    // ========== OAuth2 客户端 1-002-020-000 =========
    ErrorCode USER_NOT_EXISTS = new ErrorCode(1_002_020_000, "用户不存在");

    // ========== OAuth2 客户端 1-002-020-000 =========
    ErrorCode OAUTH2_CLIENT_NOT_EXISTS = new ErrorCode(1_002_020_000, "OAuth2 客户端不存在");
    ErrorCode OAUTH2_CLIENT_EXISTS = new ErrorCode(1_002_020_001, "OAuth2 客户端编号已存在");
    ErrorCode OAUTH2_CLIENT_DISABLE = new ErrorCode(1_002_020_002, "OAuth2 客户端已禁用");
    ErrorCode OAUTH2_CLIENT_AUTHORIZED_GRANT_TYPE_NOT_EXISTS = new ErrorCode(1_002_020_003, "不支持该授权类型");
    ErrorCode OAUTH2_CLIENT_SCOPE_OVER = new ErrorCode(1_002_020_004, "授权范围过大");
    ErrorCode OAUTH2_CLIENT_REDIRECT_URI_NOT_MATCH = new ErrorCode(1_002_020_005, "无效 redirect_uri: {}");
    ErrorCode OAUTH2_CLIENT_CLIENT_SECRET_ERROR = new ErrorCode(1_002_020_006, "无效 client_secret: {}");


    // ========== OAuth2 授权 1-002-022-000 =========
    ErrorCode OAUTH2_CODE_NOT_EXISTS = new ErrorCode(1_002_022_000, "code 不存在");
    ErrorCode OAUTH2_CODE_EXPIRE = new ErrorCode(1_002_022_001, "code 已过期");

    // ========== 菜单 =========
    ErrorCode MENU_NOT_EXISTS = new ErrorCode(400, "菜单不存在");
    ErrorCode TENANT_NOT_MENU_PERMISSION = new ErrorCode(400, "当前租户不存在菜单权限");


    // ========== 租户 =========
    ErrorCode TENANT_NOT_EXISTS = new ErrorCode(400, "租户不存在");
    ErrorCode REQUEST_TENANT_NOT_EXISTS = new ErrorCode(400, "请传递租户Id");
    ErrorCode TENANT_NOT_ENABLE = new ErrorCode(400, "租户未启用");
    ErrorCode TENANT_EXPIRE = new ErrorCode(400, "租户已过期");
}
